
import request from './http'

export function Page4table1(sql:any) { // 获会计账户列表
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,
			sql: sql
        }
        
    })
}
export function wmsPage10Sql3(date:any) { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: true,
			sql: "SELECT ISNULL(SUM(a.S16_Quantity_Yard_o), 0) ToralYard, ISNULL(COUNT(a.S16_Quantity_Yard_o), 0) TotalRoll, ISNULL(SUM(b.S16_Quantity_Yard_o), 0) JPYard, ISNULL(COUNT(b.S16_Quantity_Yard_o), 0) JPRoll, ISNULL(SUM(c.S16_Quantity_Yard_o), 0) Yard, ISNULL(COUNT(c.S16_Quantity_Yard_o), 0) Roll FROM T_Packing_List a LEFT JOIN T_Packing_List b ON a.SDATE = b.SDATE AND a.STIMES = b.STIMES AND a.SSN = b.SSN AND b.IS_JPOrder = 1 AND b.OriginalData = 1 LEFT JOIN T_Packing_List c ON a.SDATE = c.SDATE AND a.STIMES = c.STIMES AND a.SSN = c.SSN AND c.IS_JPOrder = 0 AND c.OriginalData = 1 where a.AADate <= '" +
				date + "'"
        }
        
    })
}

export function leftTopData() { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//`SELECT *FROM  [Yustar].[dbo].[V_T_Mechanic_A] order by SortColumn DESC
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '01', '', ${localStorage.getItem('Language')}`
        }
        
    })
}
export function MechanicDataTitle() { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//"SELECT *FROM  [Yustar].[dbo].[V_T_Mechanic_Title]"
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '06', '', ${localStorage.getItem('Language')}`
        }
        
    })
}
export function getMechanicSummary() { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//"SELECT *FROM  [Yustar].[dbo].[V_T_Mechanic_Summary]"
			sql:`EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '05', '', ${localStorage.getItem('Language')}`
        }
        
    })
}
export function getMechanicTopList() { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false, //"SELECT *FROM  [Yustar].[dbo].[V_T_Mechanic_TopList]"
			sql:`EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '07', '', ${localStorage.getItem('Language')}`
        }
        
    })
}

export function getMechanicDaysQty() { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//"SELECT *FROM  [Yustar].[dbo].[V_T_Mechanic_DaysQty] order by Label"
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '02', '', ${localStorage.getItem('Language')}`
        }
        
    })
}
export function getMechanicDaysQtySec() { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//"SELECT *FROM  [Yustar].[dbo].[V_T_Mechanic_DaysQty_2] order by Label"
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '03', '', ${localStorage.getItem('Language')}`
        }
        
    })
}

export function getMechanicDaysUuid(uuid:any) { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//"SELECT *FROM  [Yustar].[dbo].[V_T_Mechanic_DaysQty_2] order by Label"
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '08', ${uuid}, ${localStorage.getItem('Language')}`
        }
        
    })
}

export function equipmentPostItemTitle(ID:any) { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//exec PROC_Ht_Dashboard '09',1,'en' 点击设备标题  1 等于接口的ID
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '09', ${ID}, ${localStorage.getItem('Language')}`
        }
        
    })
}

export function equipmentPostItemTypeStatus(ID:any) { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//exec PROC_Ht_Dashboard '10',1,'en'点击设备设备状态字样  1 等于接口的ID
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '10', ${ID}, '${localStorage.getItem('Language')}'`
        }
        
    })
}

export function getMechanicScrollTxt() { // 
    return request({
        url: 'api/Data/GetSqlData',
        method: 'POST',
        data: {
            isSingle: false,//"SELECT top 30  *FROM  [Yustar].[dbo].[V_T_Mechanic_scrollTxt] order by T_Time Desc"
			sql: `EXEC [Yustar].[dbo].[PROC_Ht_Dashboard] '04', '', ${localStorage.getItem('Language')}`
        }
        
    })
}